$(function() {
	// 初始化表单验证 
	initValidateAndSubmit();
});

var PATH_PREFIX = "";
function setPathPrefix(path) {
	PATH_PREFIX = path;
}

function initValidateAndSubmit(){
	  $("#addForm").validate({
	        focusCleanup: true,
	        rules: {
	        	emailName: {
	        		required: true
	        	},
	        	email: {
	        		required: true,
	        		email: true  
	        	}
	        },
	        messages: {
	        	emailName: {
	        		required: '邮箱名称不能为空'
	        	},
	        	email: {
	        		required: '邮箱地址不能为空',
	        		email: '请输入有效的电子邮件地址'
	        	}
	        }
	    });
}


//修改表单提交
function submitForm() {
	SubmitAndPreventSecond("addForm",null);
}
